package com.liu.netty;

import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.springframework.stereotype.Component;


@Component
@ChannelHandler.Sharable
public class ServerHanlderUp extends SimpleChannelInboundHandler<String> {




    @Override
    protected void messageReceived(ChannelHandlerContext context, String s) throws Exception {

        System.out.println("6666:接受到的消息为"+s);
        context.writeAndFlush("456");

    }
}
